﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'PRC_TB_USER_TASK_HISTORY_UP')
	BEGIN
		DROP  Procedure  dbo.PRC_TB_USER_TASK_HISTORY_UP
	END

GO

create procedure [dbo].[PRC_TB_USER_TASK_HISTORY_UP]
(
	@TUH_ID int,
	@TUH_USER_ID int,
	@TUH_TASK_ID int,
	@TUH_PROJECT varchar(80),
	@TUH_NAME varchar(100),
	@TUH_START_DATE datetime,
	@TUH_END_DATE datetime,
	@TUH_HOURS_DAY int,
	@TUH_DESCRIPTION varchar(2000),
	@TUH_TYPE int,
	@TUH_CHANGE_REQUEST_ID int,
	@TUH_CHANGE_REQUEST_RESULT_ID int,
	@TUH_CLASSIFICATION_ID int
)
as
	update TB_USER_TASK_HISTORY
	set TUH_NAME = @TUH_NAME,
	 TUH_START_DATE = @TUH_START_DATE,
	 TUH_END_DATE = @TUH_END_DATE,
	 TUH_HOURS_DAY = @TUH_HOURS_DAY,
	 TUH_DESCRIPTION = @TUH_DESCRIPTION,
	 TUH_TYPE = @TUH_TYPE,
	 TUH_CHANGE_REQUEST_ID = @TUH_CHANGE_REQUEST_ID,
	 TUH_CHANGE_REQUEST_RESULT_ID = @TUH_CHANGE_REQUEST_RESULT_ID,
	 TUH_CLASSIFICATION_ID = @TUH_CLASSIFICATION_ID
	where TUH_ID = @TUH_ID


GO

GRANT EXEC ON dbo.PRC_TB_USER_TASK_HISTORY_UP TO PUBLIC

GO

